import HttpHandler from "@/handler/HttpHandler"
import {addParamsForPath} from '@/utils/xhrPathTurn'
export default class RunningFlowApi {
  constructor() {
    this.http = new HttpHandler()
  }
  // 获取运行中流程列表(分页)
  runList(data){
    let url = '/workflow/monitorProcess/runList'
    return this.http.post(url, data)
  }
  // 挂起运行中流程
  suspend(data){
    let url = '/workflow/monitorProcess/suspend'
    return this.http.post(addParamsForPath(url, data))
  }
  // 激活运行中流程
  active(data){
    let url = '/workflow/monitorProcess/active'
    return this.http.post(addParamsForPath(url, data))
  }
  // 结束运行中流程
  end(data){
    let url = '/workflow/monitorProcess/end'
    return this.http.post(addParamsForPath(url, data))
  }
  // 获取已结束流程列表(分页)
  endList(data){
    let url = '/workflow/monitorProcess/endList'
    return this.http.post(addParamsForPath(url, data))
  }
}
